home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / swtools / trubasic / rolldemos / demos / rgb / aboutrgb.tru next >
Text File  |  1994-08-02  |  2KB  |  77 lines

  1. ! description of True BASIC demos
  2.  
  3. call tw_wset_size(0,684,684)
  4. call tw_wset_title(0,"About RGB Mode")
  5. set text justify "center","base"
  6.  
  7. call info
  8.  
  9. do
  10.     if refresh(0)=1 then call info
  11.         get mouse x,y,state
  12.         if state<>0 then stop
  13. loop
  14.  
  15. sub info
  16. clear
  17. print
  18. print
  19. let a$="RGB Mode & Advanced GL Functions"
  20. set color "magenta"
  21. set text justify "center","bottom"
  22. let r=setfont("Courier")
  23. let r=setfontstyle("Bold")
  24. let r=setfontsize(18)
  25. plot text, at .5,.93: a$
  26. set color "blue"
  27. let t=strwidth(a$)
  28. box area .5-t/2,.5+t/2,.91,.92
  29. box area 0,.01,0,1
  30. box area 0,1,.99,1
  31. box area .99,1,0,1
  32. box area 0,1,0,.01
  33. set color "white"
  34.  
  35. print
  36. print
  37. print
  38. print "     These demos use some of the advanced Graphics Library features"
  39. print "  such as doublebuffering and Gourard shading.  Most operate in RGB"
  40. print "  mode as opposed to colormap mode."
  41. print
  42. print "     Doublebuffer mode lets you draw into the back buffer and then"
  43. print "  swap the completed image into view, smoothing the animation process."
  44. print "  The use of the BASIC PICTURE statement and the BOX KEEP/SHOW commands"
  45. print "  provides an easy interface to graphical objects and rendering."
  46. print
  47. print "     The PICTURE command lets you define an object and then SCALE,"
  48. print "  ROTATE or SHIFT the image with different messages for the DRAW"
  49. print "  command.  You may also define your own transformation matrices."
  50. print
  51. print "     RGB mode specifies pixel values in RGB intensities as opposed"
  52. print "  to COLORMAP mode which associates entries in a colormap with RGB "
  53. print "  triplets.  True BASIC lets you seamlessly shift between these two"
  54. print "  modes so that you can incorporate more advanced C-level functions"
  55. print "  into your BASIC programs."
  56. print
  57. print "     In True BASIC you can specify colors with the statements:"
  58. print
  59. print
  60. set color "yellow"
  61. print "     SET COLOR clr$      SET BACK clr$      SET COLOR MIX r,g,b"
  62. set color "white"
  63. print
  64. print
  65. print "  where clr$ is a string such as ""blue"" and r,g, and b are color"
  66. print "  intensities in the range 0 to 1.  You may also specify colors by"
  67. print "  number."
  68. print 
  69. print "     For the X Windows version, there are ""shared"" and ""dynamic"" modes"
  70. print "  so that you can share resources or allocate your own read-write"
  71. print "  cells."
  72. print
  73. print "               <click the left mouse button to continue>"
  74. end sub
  75.  
  76. end
  77.